package design_mode.策略模式.打折算法;

public class CashRebate extends CashSuper {
    // 打折
    private double moneyRebate = 1d;

    public CashRebate(double moneyRebate) {
        /**
         * 输入折扣率
         */
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double price, int num) {

        return price * num * moneyRebate;
    }
}
